<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        window.onload = function () {

        }
        function changeImg(obj) {
            obj.src="checkImg?time="+new Date().getTime();
        }
    </script>
</head>
<body>
    <form action="LoginServlet" method="post">
        用户名：<input type="text" name="username"><br/>
        密码：<input type="password" name="password"><br/>
        验证码：<input type="text" name=""><img onclick="changeImg(this)" src="checkImg"><br>
        <input type="submit" value="登录"><br>
    </form>
</body>
</html>